<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:ui="http://java.sun.com/jsf/facelets"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:c="http://java.sun.com/jsp/jstl/core">
	<head><title>IGNORED</title></head>
	<body>
		<ui:composition template="../templates/layout.xhtml">
			<ui:define name="windowTitle">Daily Market | Partners | Manage Deal</ui:define>
			<ui:define name="logoImage"><h:graphicImage library="images" name="logo_header.jpg" alt="logo" /></ui:define>
			<ui:define name="content">
				<div id="content" class="graphic_bg">
					<h:messages globalOnly="true" styleClass="form-messages" fatalClass="form-messages error" errorClass="form-messages error" warnClass="form-messages warn" infoClass="form-messages" />
					<div class="deal-image">
						<img src="#{dealList.dealBean.findDefaultImageUrl(300)}" alt="#{dealList.dealBean.shortDesc}" id="deal_image" />
						<c:forEach items="#{dealList.dealBean.images}" var="image" begin="0" end="5">
							<a href="Javascript:;" onclick="set_deal_image('#{dealList.dealBean.findImageUrl(image, 300)}');" class="image-link"><img src="#{dealList.dealBean.findImageUrl(image, 50)}" alt="#{image}" title="Product Image" /></a>
						</c:forEach>
					</div>
					<div class="deal-vitals">
						<div class="deal-actionbox">
							<h:form id="deal_manager_form">
								<h:link outcome="purchases" styleClass="table-link"><h:graphicImage library="images/icons/32" name="finance.png" alt="p" title="View Purchases" styleClass="with-text-middle" />View <h:outputText value="#{codeListBean.purchasesOfSingDeal}" styleClass="deal-purchases" /> Purchases</h:link>
								<br />
								<h:commandLink action="#{dealList.doEditDeal()}" styleClass="table-link"><h:graphicImage library="images/icons/32" name="script_edit.png" alt="e" title="Modify Deal" styleClass="with-text-middle" />Modify Deal</h:commandLink>
								<br />
								<a href="Javascript:;" onclick="do_confirm_delete_deal('#{dealList.dealBean.shortDesc}');" class="table-link"><h:graphicImage library="images/icons/32" name="script_delete.png" alt="m" title="Expire Deal" styleClass="with-text-middle" />Retract Deal</a>
								<h:commandLink action="#{dealList.doDeleteDeal()}" id="delete-deal" styleClass="del-deal-command" style="display: none; visibility: hidden;" />
							</h:form>
						</div>
						<h:outputText value="#{dealList.dealBean.shortDesc}" styleClass="deal-title detail" />
						<h:outputText value="#{dealList.dealBean.priceDisplay}" styleClass="deal-pricetag" />
						<h:outputText value="#{dealList.dealBean.timeLeftDisplay}" styleClass="deal-timer" style="#{dealList.dealBean.timeLeftStyle}" rendered="#{dealList.dealBean.timed}" />
					</div>
					<div class="deal-details">
						<h:outputText value="#{dealList.dealBean.companyDisplay}" styleClass="deal-company" />
						<h:outputText value="#{dealList.dealBean.longDesc}" />
						
					</div>
				</div>
			</ui:define>
		</ui:composition>
	</body>
</html>
